package nmt.banweb.client;

/**
 * Holds the results of a search request,
 * so that the search doesn't need to be done again until the user changes the search criteria
 * @author Benjamin Bean
 */
public class SearchResults {
	/* Should contain the current search terms at all times
	 * (after the user has submitted the term/chosen to delete it)
	 */
	SearchSearchtermsContainer currSearchterms;
	/* Should be update every time the user chooses to change
	 * the search terms
	 */
	CourseSubject currResults;
	
	/**
	 * Initialize object with empty objects.
	 */
	SearchResults()
	{
		currSearchterms = new SearchSearchtermsContainer();
		currResults = new CourseSubject();
	}
	
	/**
	 * Refines "CurrResults" with the new searchterm and
	 * adds "Searchterm" to "CurrSearchterms".
	 * @param Searchterm The new searchterm to refine results with.
	 */
	void RefineSearch(SearchSearchterm Searchterm)
	{
	}
	
	/**
	 * Adds a search term to "CurrSearchterms" and updates "CurrResults".
	 * The only courses that should need to be searched again would be those in "CurrResults"
	 * since they are the only ones that have passed previous search criteria.
	 * @param Searchterm The term to add
	 * @return The number of matching courses (size of CurrResults)
	 */
	public int AddSearchterm(SearchSearchterm Searchterm)
	{
		return 0;
	}
	
	/**
	 * Removes a search term from "CurrSearchterms" and updates "CurrResults".
	 * "CurrResults" will need to be completely recreated, starting from CourseSubjectContainer.GetAll().
	 * @param Searchterm The term to add
	 * @return The number of matching courses (size of CurrResults)
	 */
	public int RemoveSearchterm(SearchSearchterm Searchterm)
	{
		return 0;
	}
	
	public SearchSearchtermsContainer GetAllTerms()
	{
		return null;
	}
	
	public CourseCourse[] GetAllCourses()
	{
		return null;
	}
}
